﻿Public Class NComprador
    Public Function cargarComprador(ByVal item As Entidades.Ecomprador) As Boolean

        Dim oDatos As New Datos.DComprador
        Dim oComprador As New List(Of Entidades.Ecomprador)
        Dim band As Boolean
        Try

            band = oDatos.insertarcomprador(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band

    End Function

    Public Function comboloc() As DataTable
        Dim oDatos As New Datos.DComprador
        Try
            Return oDatos.llenarcombo
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function


    Public Function busquedanombre(ByVal nom As String) As DataTable
        Dim oDatos As New Datos.DComprador
        Try
            Return oDatos.busquedaxnombrecomp(nom)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function
    Public Function busquedadni(ByVal dni As String) As DataTable
        Dim oDatos As New Datos.DComprador
        Try
            Return oDatos.busquedaxdnicomp(dni)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function
End Class
